package test;
import java.util.Scanner;
public class panduan {
    static int[] a=new int[5];
    static String[] b ={"A","B","C","D","E"};
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        panduan(0);
        scan.close();
    }
    static void panduan(int j) {
        if (j == 5) {
            if (a[0] == a[1] && a[1] + a[2] == 1 && a[3] == 0 && a[2] + a[4] <= 1) {
                for (int k = 0; k < 5; k++) {
                    if (a[k] == 1) {
                        System.out.print(b[k] + " ");
                    }
                }
                System.out.println();
            }return ;
        }
        panduan(j+1);
        a[j] = 1;
        panduan(j+1);
        a[j] = 0;
    }
}
